//
//  CCNetwork.h
//  CCFC_IPHONE
//
//  Created by 陈曦 xichen2 on 10-11-1.
//  Copyright 2010 iFLYTEK. All rights reserved.
//
#ifndef	CC_NETWORK
#define	CC_NETWORK

#include "CCAll.h"

#ifdef	__OBJC__
#import <Foundation/Foundation.h>

#define	CREATE_URL(urlStr)	[NSURL URLWithString:(urlStr)]

//调用系统默认浏览器，打开url
#define	OPEN_URL(url)	[[UIApplication sharedApplication] openURL:(url)]


@interface CCNetwork : NSObject 
{
	
}

//检测网络状态(如果没有指定url,那么将直接测试是否能够连接到google的域名服务器地址：8.8.8.8)
+ (NSURLConnection *)startNetworkStatusTest:(NSString *)url withDelegate:(id)delegate;

//官方提供的测试网络状态是否正常代码：NB. 在iPhone3上存在bug
+ (BOOL)isConnectedToNetwork;

@end

#endif	//OBJC_MACRO
#endif	//CC_NETWORK
